package com.sea.physical.service.impl;


import com.sea.physical.entity.Cabinet;
import com.sea.physical.mapper.CabinetMapper;
import com.sea.physical.service.CabinetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class CabinetServiceImpl implements CabinetService {

    @Autowired
    private CabinetMapper cabinetMapper;

    @Override
    public List<Cabinet> findByCnd(Cabinet cabinet) {
        return cabinetMapper.findByCnd(cabinet);
    }

    @Override
    public int delete(Integer id) {
        return cabinetMapper.delete(id);
    }

    @Override
    public int save(Cabinet cabinet) {
        return cabinetMapper.insert(cabinet);
    }

    @Override
    public Cabinet findByName(String cabinetName) {
        return cabinetMapper.findByName(cabinetName);
    }


}
